# 将一个变量赋值的运算符
# =直接赋值
a = 20
print(a)
# += 将左边变量自身加上右边的值 在赋值给左边
a += 20  # a =a+20
print(a)
# -=
a -= 10
print(a)
# *=
a *= 2
print(a)
# /=
a /= 2
print(a)
# //=
a //= 10
print(a)
# %=
a %= 2
print(a)
# **=
a **= 2
print(a)
# a和b两个变量 a=20 b=30 要求交换a和b的值 a=30 b=20
# 引入第三个变量 c
a = 20
b = 30
# 现将a的值赋值给c
c = a
# 将b的值赋值给a
a = b
# c的值（原来a的值）赋值给b
b = c
print(a, b)
a = 20
b = 30
a, b = b, a
print(a,b)
# 使用加法操作的
a = 20
b = 30
a = a+b
b = a-b
a = a-b
print(a,b)